home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4676 < prev    next >
Encoding:
Text File  |  1996-08-05  |  675 b   |  22 lines

  1. Newsgroups: comp.lang.c
  2. Path: netcom.com!clint
  3. From: clint@netcom.com (Clinton Carr)
  4. Subject: Reading child pgm's stdout?
  5. Message-ID: <clintDMCyH6.Ky3@netcom.com>
  6. Summary: How to read a child's program stdout? 
  7. Keywords: stdout redirection ios streams
  8. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  9. X-Newsreader: TIN [version 1.2 PL1]
  10. Date: Tue, 6 Feb 1996 14:19:54 GMT
  11. Sender: clint@netcom4.netcom.com
  12.  
  13. Can someone provide a snippet of code that reads the
  14. stdout of a child's program?  If I use Perl, then the
  15. following statement does it for me.
  16.  
  17. $answer = system("/usr/local/bin/childpgm.pl");
  18.  
  19. The above childpgm.pl is writing to stdout.
  20.  
  21. thanks
  22.